package com.tuanzi.loan.business.service.family.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tuanzi.loan.business.entity.family.ProductInfoTag;
import com.tuanzi.loan.business.repository.family.ProductInfoTagRepository;
import com.tuanzi.loan.business.service.family.ProductInfoTagService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.loan.core.service.BaseAuditServiceImpl;

/**
 * @author Ray 2017/09/21
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class ProductInfoTagServiceImpl extends BaseAuditServiceImpl<ProductInfoTag, Long> implements ProductInfoTagService {

    @Autowired
    private ProductInfoTagRepository productInfoTagRepository;

    @Override

    protected JPAAuditRepository<ProductInfoTag, Long> getRepository() {
        return productInfoTagRepository;
    }

    @Override
    public List<ProductInfoTag> findAllByProductInfoId(Long productInfoId) {
        return productInfoTagRepository.findAllByProductInfoId(productInfoId);
    }
}
